package com.ruoyi.statistic.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.statistic.mapper.TMonthSalaryWaybillRelMapper;
import com.ruoyi.statistic.domain.TMonthSalaryWaybillRel;
import com.ruoyi.statistic.service.ITMonthSalaryWaybillRelService;

/**
 * 月工资关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-30 22:27:10
 */
@Service
public class TMonthSalaryWaybillRelServiceImpl implements ITMonthSalaryWaybillRelService 
{
    @Autowired
    private TMonthSalaryWaybillRelMapper tMonthSalaryWaybillRelMapper;

    /**
     * 查询月工资关联
     * 
     * @param salaryBillId 月工资关联主键
     * @return 月工资关联
     */
    @Override
    public TMonthSalaryWaybillRel selectTMonthSalaryWaybillRelBySalaryBillId(Long salaryBillId)
    {
        return tMonthSalaryWaybillRelMapper.selectTMonthSalaryWaybillRelBySalaryBillId(salaryBillId);
    }

    /**
     * 查询月工资关联列表
     * 
     * @param tMonthSalaryWaybillRel 月工资关联
     * @return 月工资关联
     */
    @Override
    public List<TMonthSalaryWaybillRel> selectTMonthSalaryWaybillRelList(TMonthSalaryWaybillRel tMonthSalaryWaybillRel)
    {
        return tMonthSalaryWaybillRelMapper.selectTMonthSalaryWaybillRelList(tMonthSalaryWaybillRel);
    }

    /**
     * 新增月工资关联
     * 
     * @param tMonthSalaryWaybillRel 月工资关联
     * @return 结果
     */
    @Override
    public int insertTMonthSalaryWaybillRel(TMonthSalaryWaybillRel tMonthSalaryWaybillRel)
    {
        return tMonthSalaryWaybillRelMapper.insertTMonthSalaryWaybillRel(tMonthSalaryWaybillRel);
    }

    /**
     * 修改月工资关联
     * 
     * @param tMonthSalaryWaybillRel 月工资关联
     * @return 结果
     */
    @Override
    public int updateTMonthSalaryWaybillRel(TMonthSalaryWaybillRel tMonthSalaryWaybillRel)
    {
        return tMonthSalaryWaybillRelMapper.updateTMonthSalaryWaybillRel(tMonthSalaryWaybillRel);
    }

    /**
     * 批量删除月工资关联
     * 
     * @param salaryBillIds 需要删除的月工资关联主键
     * @return 结果
     */
    @Override
    public int deleteTMonthSalaryWaybillRelBySalaryBillIds(Long[] salaryBillIds)
    {
        return tMonthSalaryWaybillRelMapper.deleteTMonthSalaryWaybillRelBySalaryBillIds(salaryBillIds);
    }

    /**
     * 删除月工资关联信息
     * 
     * @param salaryBillId 月工资关联主键
     * @return 结果
     */
    @Override
    public int deleteTMonthSalaryWaybillRelBySalaryBillId(Long salaryBillId)
    {
        return tMonthSalaryWaybillRelMapper.deleteTMonthSalaryWaybillRelBySalaryBillId(salaryBillId);
    }

    /**
     * 新增月工资关联
     *
     * @param salaryBillId 月工资单ID
     * @param wayBillIds 运单ID
     * @return 结果
     */
    @Override
    public int insertTMonthSalaryWayBillRelExt(Long salaryBillId, List<Long> wayBillIds)
    {
        return tMonthSalaryWaybillRelMapper.insertTMonthSalaryWayBillRelExt(salaryBillId, wayBillIds);
    }
}
